package com.smart.campus.controller;

import com.smart.campus.dto.ShClass;
import com.smart.campus.interfaces.ShClassServiceApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.ShClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: JinBao shan
 * @date 2024/9/23 20:33
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
public class ShClassController implements ShClassServiceApi {
    @Autowired
    private ShClassService classService;

    @Override
    public PagedResponse<ShClass> findShClassPagination(ShClass shClass, Integer pageNum, Integer pageSize) {
        return classService.findShClassPagination(shClass,pageNum,pageSize);
    }

    @Override
    public List<ShClass> getShClassList(Integer grade) {
        return classService.getShClassList(grade);
    }

    @Override
    public void addShClass(ShClass shClass) {
        classService.addShClass(shClass);
    }

    @Override
    public ShClass getShClassById(Integer id) {
        return classService.getShClassById(id);
    }

    @Override
    public void updateShClassById(ShClass shClass) {
        classService.updateShClassById(shClass);
    }

    @Override
    public void deleteShClassById(Integer id) {
        classService.deleteShClassById(id);
    }

    @Override
    public List<ShClass> getShClassListAll() {
        return classService.getShClassListAll();
    }
}
